package visitor.source;

/**
 * @author cheng:
 * @date 2019/4/27 13:19
 */
public class Test {
    public static void main(String[] args) {
        ObjectStructure structure = new ObjectStructure();

        structure.attach(new ConcreteElementA());
        structure.attach(new ConcreteElementB());

        Visitor v1 = new ConcreteVisitor1();
        Visitor v2 = new ConcreteVisitor2();

        structure.accept(v1);
        structure.accept(v2);
    }
}
